package com.cjl.generic.bean;

import com.cjl.generic.impl.AiFruitPlate;
import com.cjl.generic.impl.FruitPlate;
import com.cjl.generic.impl.FruitPlateGen;

public class SuperMan extends Person{
    public FruitPlate getPlate(){
        return new FruitPlate();
    }

    public AiFruitPlate getAiFruitPlate(){
        return new AiFruitPlate();
    }

    public FruitPlateGen getAiFruitPlateGen(FruitPlateGen<Fruit> plate){
        return new FruitPlateGen();
    }

    //上限通配符
    public FruitPlateGen getAiFruitPlateGen2(FruitPlateGen<? extends Fruit> plate){
        return new FruitPlateGen();
    }

    public FruitPlateGen getAiFruitPlateGen3(FruitPlateGen<? super Apple> plate){
        return new FruitPlateGen();
    }


    public void addFruit(FruitPlate fruitPlate,Fruit fruit){
        fruitPlate.set(fruit);
    }

    public void add(AiFruitPlate<Orange> aiFruitPlate,Orange orange){
        aiFruitPlate.set(orange);
    }
}
